import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";
import Step1 from "../views/hotkey/step-1.vue";
import Step2 from "../views/hotkey/step-2.vue";
import Step3 from "../views/hotkey/step-3.vue";
import Step4 from "../views/hotkey/step-4.vue";
import Step5 from "../views/hotkey/step-5.vue";
import Step6 from "../views/hotkey/step-6.vue";
import Step7 from "../views/hotkey/step-7.vue";
import Start from "../views/hotkey/start.vue";
import Step from "../views/hotkey/step.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    name: "Home",
    component: Home,
  },
  {
    path: "/transfer",
    name: "transfer",
    component: () => import("../views/transfer.vue"),
  },
  {
    path: "/start",
    alias: "/start",
    component: Start,
  },
  {
    path: "/step",
    component: Step,
    children: [
      {
        path: "1",
        component: Step1,
      },
      {
        path: "2",
        component: Step2,
      },
      {
        path: "3",
        component: Step3,
      },
      {
        path: "4",
        component: Step4,
      },
      {
        path: "5",
        component: Step5,
      },
      {
        path: "6",
        component: Step6,
      },
      {
        path: "7",
        component: Step7,
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

router.afterEach((to) => {
  document.title = "自定义指令";
});

export default router;
